from multiprocessing import Process
import time

def sing():
    print("===>> sing run!")
    time.sleep(2)
    print("===>> sing completed!")


def dance():
    print("===>> dance run!")
    time.sleep(2)
    print("===>> dance completed!")

if __name__ == "__main__":
    # 主进程 | 写时拷贝，读时共享
    process_1 = Process(target=sing)
    process_2 = Process(target=dance)
    process_1.start()
    process_2.start()

    print("===>> main Process!")
    # 会等待所有子进程执行完后结束主进程。